<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            /* 默认情况下，盒子的大小由内容区，内边距，边框所决定 */
            width: 100px;
            height: 100px;
            padding: 10px;
            border: 10px red solid;
            background-color: aquamarine;

            /* box-sizing: content-box; */
            /*content-box代表盒子的大小由width,height,padding,border所共同决定*/
            box-sizing: border-box;
            /*border-box代表盒子的大小只由width和height所决定*/
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>